#include "ElementalVulnerability.h"

#include "Character.h"
#include "Stats.h"
#include "Target.h"

ElementalVulnerability::ElementalVulnerability(Character* pchar) :
    UniqueDebuff(pchar, "Elemental Vulnerability 6p T3", "Assets/spell/Spell_holy_dizzy.png", Priority::Low, BuffDuration::PERMANENT, 1),
    SetBonusRequirer({"Frostfire Regalia"}) {}

void ElementalVulnerability::buff_effect_when_applied() {
    pchar->get_target()->get_stats()->increase_base_spell_damage(200);
    pchar->get_target()->add_charge_debuff(this, ConsumedWhen::OnSpellDamageFlat);
}

void ElementalVulnerability::buff_effect_when_removed() {
    pchar->get_target()->get_stats()->decrease_base_spell_damage(200);
    pchar->get_target()->remove_charge_debuff(this, ConsumedWhen::OnSpellDamageFlat);
}

void ElementalVulnerability::activate_set_bonus_effect(const QString&, const int) {
    enable_buff();
}

void ElementalVulnerability::deactivate_set_bonus_effect(const QString&, const int) {
    disable_buff();
}
